﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace PuzzleWCF
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IPuzzleRakingService
    {
        [OperationContract]
        int SavePlayerTime(Player player);

        [OperationContract]
        IEnumerable<Player> GetTop5();

        //[OperationContract]
        //IEnumerable<Player> GetAllPlayerTimes(int page);
    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class Player
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public String Name { get; set; }
        [DataMember]
        public TimeSpan Time { get; set; }
    }
}
